<%@page import="org.pictual.util.RequestKeys"%>
<%@page import="java.util.ResourceBundle"%>
<%@ taglib uri="/tags/struts-bean" prefix="bean"%>
<%@ taglib uri="/tags/struts-html" prefix="html"%>
<%@ taglib uri="/tags/struts-logic" prefix="logic"%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>

<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<div id="warp" style="background-color: <bean:write name="color"/> ">
	<div id="warp-inner">
				<logic:present name="error" scope="request">
					<bean:write name="error" scope="request"/>
				</logic:present>
				
				<logic:notPresent name="error" scope="request">
				
					<html:form action="data">
					
						<div class="columna_izquierda">
							<h2><bean:write name="query"/></h2>
							<h3>Language: <bean:write name="from"/></h3>
							<h3>Dictionary: <bean:write name="to"/></h3>
							<h3>Source: <bean:write name="source"/></h3>
							
							<dl>
								<!-- id -->
								<dt class="strong_text">
									<bean:message key="label.data.id" />
								</dt>
								<dd>
									<html:text property="id" readonly="true" />
								</dd>
								
								<!-- palabra -->
								<dt class="strong_text">
									<bean:message key="label.data.palabra" />
								</dt>
								<dd>
									<html:text property="palabra" readonly="true" />
								</dd>
								
								<!-- idioma -->
								<dt class="strong_text">
									<bean:message key="label.data.idioma" />
								</dt>
								<dd>
									<html:text property="idioma" readonly="true" />
								</dd>
								
								<!-- wiki -->
								<dt class="strong_text">
									<bean:message key="label.data.wiki" />
								</dt>
								<dd>
									<html:text property="wiki" readonly="true" />
								</dd>
								
						
					</dl>
					
					
					<logic:present name="wiki" scope="request">
							<html:textarea cols="30" rows="20" property="cadena"
								disabled="true" />

						</logic:present>
					
					
					
					<!-- Imagenes -->
						<logic:present name="images"> 
							<div id="galeria">
								<div id="galeria_imagen">
									<img id="imgGaleria" src="<bean:write name='img1'/>" />
								</div>
								<div id="galeria_miniaturas">
									<logic:iterate id="img" name="images" scope="request" >
										<img 
											class="miniatura" 
											onclick="javascript:document.getElementById('imgGaleria').src='<bean:write name='img' property='imgThumbnail'/>';" 
											src="<bean:write name='img' property='imgThumbnail' />" 
										/>
											
									</logic:iterate>
								</div>
							</div>
						</logic:present>
					
					
					
						</div>
		
						<div class="columna_derecha">
							<dl>
								<!-- info -->
								<dt class="strong_text">
									<bean:message key="label.data.info" />
								</dt>
								<dd>
									<html:text property="info" readonly="true" />
								</dd>
								
								<!-- pronunciacion -->
								<dt class="strong_text">
									<bean:message key="label.data.pronunciacion" />
								</dt>
								<dd>
									<html:text property="pronunciacion" readonly="true" />
								</dd>
								
								<!-- genero -->
								<dt class="strong_text">
									<bean:message key="label.data.genero" />
								</dt>
								<dd>
									<html:text property="genero" readonly="true" />
								</dd>
								
								<!-- plural -->
								<dt class="strong_text">
									<bean:message key="label.data.plural" />
								</dt>
								<dd>
									<html:text property="plural" readonly="true" />
								</dd>
								
								<!-- audio -->
								<dt class="strong_text">
									<bean:message key="label.data.audio" />
								</dt>
								<dd>
									<html:text property="audio" readonly="true" />
								</dd>
								
								<!-- verbo -->
								<dt class="strong_text">
									<bean:message key="label.data.verbo" />
								</dt>
								<dd>
									<html:text property="verbo" readonly="true" />
								</dd>
								
								<!-- sustantivo -->
								<dt class="strong_text">
									<bean:message key="label.data.sustantivo" />
								</dt>
								<dd>
									<html:text property="sustantivo" readonly="true" />
								</dd>
								
								<!-- otro -->
								<dt class="strong_text">
									<bean:message key="label.data.otro" />
								</dt>
								<dd>
									<html:text property="otro" readonly="true" />
								</dd>
								
								<!-- en -->
								<dt class="strong_text">
									<bean:message key="label.data.en" />
								</dt>
								<dd>
									<html:text property="en" readonly="true" />
								</dd>
								
								<!-- es -->
								<dt class="strong_text">
									<bean:message key="label.data.es" />
								</dt>
								<dd>
									<html:text property="es" readonly="true" />
								</dd>
								
								<!-- de -->
								<dt class="strong_text">
									<bean:message key="label.data.de" />
								</dt>
								<dd>
									<html:text property="de" readonly="true" />
								</dd>
								
								<!-- fr -->
								<dt class="strong_text">
									<bean:message key="label.data.fr" />
								</dt>
								<dd>
									<html:text property="fr" readonly="true" />
								</dd>
								
								<!-- conjugacion -->
								<dt class="strong_text">
									<bean:message key="label.data.conjugacion" />
								</dt>
								<dd>
									<html:text property="conjugacion" readonly="true" />
								</dd>
								
								<!-- cod_audio -->
								<dt class="strong_text">
									<bean:message key="label.data.cod_audio" />
								</dt>
								<dd>
									<html:text property="cod_audio" readonly="true" />
								</dd>
							</dl>
						</div>
					
						<div class="columna_central">
							<dl>
								<!-- d1 -->
								<dt class="strong_text">
									<bean:message key="label.data.d1" />
								</dt>
								<dd>
									<html:textarea cols="40" rows="5" property="d1" readonly="true" />
								</dd>
								
								<!-- e1 -->
								<dt class="strong_text">
									<bean:message key="label.data.e1" />
								</dt>
								<dd>
									<html:textarea cols="40" rows="5" property="e1" readonly="true" />
								</dd>
								
								<!-- d2 -->
								<dt class="strong_text">
									<bean:message key="label.data.d2" />
								</dt>
								<dd>
									<html:textarea cols="40" rows="5" property="d2" readonly="true" />
								</dd>
								
								<!-- e2 -->
								<dt class="strong_text">
									<bean:message key="label.data.e2" />
								</dt>
								<dd>
									<html:textarea cols="40" rows="5"  property="e2" readonly="true" />
								</dd>
								
								<!-- d3 -->
								<dt class="strong_text">
									<bean:message key="label.data.d3" />
								</dt>
								<dd>
									<html:textarea cols="40" rows="5"  property="d3" readonly="true" />
								</dd>
								
								<!-- e3 -->
								<dt class="strong_text">
									<bean:message key="label.data.e3" />
								</dt>
								<dd>
									<html:textarea cols="40" rows="5"  property="e3" readonly="true" />
								</dd>
							</dl>
							
							<!-- botones -->
						<logic:present name="wiki" scope="request">
							<html:form action="data.do?source=add">
								<html:submit value="add" />
							</html:form>
						</logic:present>
				
						<logic:present name="database" scope="request">
							<html:submit value="update" disabled="true" />
							<html:submit value="delete" disabled="true" />
						</logic:present>
						</div>
							
					</html:form>
				
				</logic:notPresent>

		

		
				
		
		
	</div>
</div>